package com.fast.develop.dm.meta.field.catalog;

import com.fast.develop.dm.meta.field.FieldCatelog;

/**
 * @author 莫寅
 * @createTime 2022-06-02 16:31
 * @desc：
 */
public class RelationCatalog implements FieldCatelog {


    private RelationModeField field;

    private Relation type;


    @Override
    public String type() {
        return type.toString();
    }


    public static class RelationModeField{
        private String metaModelId;
        private String metaFieldId;

        public String getMetaModelId() {
            return metaModelId;
        }

        public void setMetaModelId(String metaModelId) {
            this.metaModelId = metaModelId;
        }

        public String getMetaFieldId() {
            return metaFieldId;
        }

        public void setMetaFieldId(String metaFieldId) {
            this.metaFieldId = metaFieldId;
        }
    }


    public enum Relation{
        onetoone, onetomany, manytoone, manytomany
    }

    public RelationModeField getField() {
        return field;
    }

    public void setField(RelationModeField field) {
        this.field = field;
    }

    public Relation getType() {
        return type;
    }

    public void setType(Relation type) {
        this.type = type;
    }
}
